//
//  UIButton+QYCountdown.h
//  CarPooling
//
//  Created by Dxc_iOS on 2018/5/31.
//  Copyright © 2018年 代星创. All rights reserved.
//

#import <UIKit/UIKit.h>
/**
 * 倒计时回调Block
 */
typedef void(^QYCountdownCompletionBlock)(void);

@interface UIButton (QYCountdown)
/**
 *倒计时，s倒计
 */
- (void)QY_countdownWithSec:(NSInteger)time;
/**
 *倒计时，秒字倒计
 */
- (void)QY_countdownWithSecond:(NSInteger)second;
/**
 *倒计时，s倒计,带有回调
 */
- (void)QY_countdownWithSec:(NSInteger)sec completion:(QYCountdownCompletionBlock)block;
/**
 *倒计时,秒字倒计，带有回调
 */
- (void)QY_countdownWithSecond:(NSInteger)second completion:(QYCountdownCompletionBlock)block;



/**使用

 //s倒计
[button QY_countdownWithSec:30];
 
  //秒字倒计
  [button QY_countdownWithSecond:31];
 
 // s倒计,带有回调
 [button QY_countdownWithSec:30 completion:^{
 [button setTitle:@"重新获取" forState:(UIControlStateNormal)];
 }];
 
  //秒字倒计，带有回调
  [button QY_countdownWithSecond:30 completion:^{
  [button setTitle:@"重新获取" forState:(UIControlStateNormal)];
 }];
 */
@end
